import { request } from '@umijs/max';

// 分页请求面试题
export const getInterviewTitleApi = (params)=>{
    return request('/api/interview',{
        method:'GET',
        params:{...params}
    })
}

// 根据id 请求面试题
export const getInterviewById = (id)=>{
    return request(`/api/interview/${id}`)
}

export const addInterviewApi = (data)=>{
    return request('/api/interview',{
        method:'POST',
        data
    })
}

export const editInterviewApi = (id,data)=>{
    return request(`/api/interview/${id}`,{
        method:'PATCH',
        data
    })
}

export const deleteInterviewApi = (id)=>{
    return request(`/api/interview/${id}`,{
        method:"DELETE"
    })
}